change text of a box during runtime

I need to add text (strings) to a dialog box. The user clicks on a button and after I managed that input I want to write a summary of what he entered.

example:

Input choice:   Filter 1 =  <1  && >3

Input choice:   Filter 2 =  <6  && <8

 

text in textbox: Filter 1 over Attribute x: <1  && >3

                        Filter 2 over Attribute x: <6  && >8

 

my question is how to write to any text box by code?

is there a string which I can overwrite to manipulate it?

which type is best for this (field, text, richText,...)?

and how can I refresh the box that the updated string is visible for the user?

 

thanks,

Henrik

 


Henrik15 - Mon Aug 03 03:36:11 EDT 2015

Re: change text of a box during runtime
llandale - Wed Aug 05 18:29:30 EDT 2015

Callback functions do this all the time.  You will find out quickly that it is best if your DB and DBE variables are all declared at the top of your script globally, so they are available to the callbacks.

DB dbExample
DBE dbeField1, dbeField2, dbeResults

void applyResults(DB dbXX)
{ // Display results

 string f1 = get(dbeField1)
 string f2 = get(dbeField2)
 string Results = "F1: [" f1 "]\nF2: [" f2 "]"
 set(dbeResults, Results)
} // end applyResults()


dbExample = create("Example")
dbeField1 = field(dbExample, "Field1", "aa dd", 30, false)
dbeField2 = field(dbExample, "Field2", "dd xx", 30, false)
dbeResults= text(dbExample, "Results", "", 200, 50, true)
apply(dbExample, "Make Results", applyResults)

applyResults(dbExample)    // show initial "Results"

show(dbExample)

-Louie